//
//  GameControlLayer.h
//  AngerDragon
//
//  Created by gaotime_macbook_2 on 11-12-6.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"

/// 游戏主状态机
typedef enum GameMainState {
	kGameMainState_nil = 0,
	
	/// 加载游戏
	kGameMainState_Loading,
	/// 游戏正常运行状态
	kGameMainState_Running,
	/// 本次游戏失败
	kGameMainState_CurrentGameOver,
	/// 游戏彻底失败
	kGameMainState_GameOver,
	/// 本次游戏胜利
	kGameMainState_CurrentGameWin,
	/// 游戏暂停
	kGameMainState_Pause,
	/// 退出游戏(此时要保存相关数据)
	kGameMainState_Quit
	
}GameMainState_st;

/// 数据固化层协议
@protocol TYDataSolidifyProtocol;
/// 剧本解读层协议
@protocol TYScenarioInterpretationProtocol;
/// 地图层协议
@protocol TYMapProtocol;
/// 精灵层协议
@protocol TYSpriteLayerProtocol;

/// 状态机系统协议
@protocol TYStateSystemProtocol;

@interface ScreenGameControlLayer : CCLayer {

@private
	/// 数据固化层协议
	//id<TYDataSolidifyProtocol>           m_data_solidify_protocol;
	/// 剧本解读层协议
	//id<TYScenarioInterpretationProtocol> m_scenario_interpretation_protocol;
	/// 地图层协议
	//id<TYMapProtocol>                    m_map_protocol;
	/// 精灵层协议
	//id<TYSpriteLayerProtocol>            m_sprite_layer_protocol;
	
	/// 状态机
	id<TYStateSystemProtocol>            m_state;
	
}
@property (readonly) id<TYStateSystemProtocol> m_state; 
 
/// 游戏控制层对外通信的接口
+ (NSInteger) getState;
+ (void) setState:(NSInteger) a_n_state;
@end
